<?php
$timestart=microtime(true);
$me1 = memory_get_usage();  
define('ZSM_ROOT_DIR',realpath(dirname(__FILE__)));
define('ZSM_DEBUG',2047);
define('ZSM_WEB_DIR', strtolower(preg_replace('/[\w]+.php/','',strtolower($_SERVER['SCRIPT_NAME']))));
define('ZSM_LOG_DIR',ZSM_ROOT_DIR.DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR);
define('ZSM_CACHE_DIR',ZSM_ROOT_DIR.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);
define('ZSM_WWW_HOST','http://'.$_SERVER['HTTP_HOST'].ZSM_WEB_DIR);	
define('ZSM_USER_IMG', ZSM_WWW_HOST.'upload/images/users/');
define('ZSM_PRE_PAGE',@$_SERVER['HTTP_REFERER']) ;
define('ZSM_THIS_PAGE', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
//如果网站根目录不是www，下面的需要改动
define('ZSM_WEB_PATH', ZSM_ROOT_DIR.DIRECTORY_SEPARATOR);
define('ZSM_WEB_NAME', 'iQuiz Manager System');
error_reporting(ZSM_DEBUG);
require ZSM_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php';
$timeend = microtime(true);	
$runtime = $timeend-$timestart; 
$me2 = memory_get_usage();				
echo '<div style="background:green;color:#ffffff; padding-top:4px;padding-left:10px;padding-right:10px;top: 0px;left: 0px; margin: 0 auto; position: fixed;z-index: 1000;height:40px;width:150px;border:solid 1px #333333;">runtime: '.substr($runtime,0,6).' minutes ';
echo ' <br>memory:'.substr((($me2-$me1)/1024/1024),0,5).'MB</div>';	

